<?php

namespace mpend\models;

use Yii;
use common\helpers\Url;
use common\models\work\WorkCategory;

/**
 * 首页默认面板信息
 *
 * @author emhome <emhome@163.com>
 * @since 1.0
 */
class SiteLogic extends \common\logics\DashboardLogic {

    /**
     * @var array top pages
     */
    public $share_data = null;

    /**
     * Set Dual column display panel
     * @inheritdoc
     */
    protected function setShareData() {
        $path = [
            '/pages/index/main'
        ];
        $uid = $this->getUserId();
        if ($uid) {
            $path['from'] = $uid;
        }
        return [
            'title' => Yii::$app->name,
            'thumb' => Url::attach('/assets/share/foreman.jpg'),
            'icon' => Url::attach('/assets/share/foreman.jpg'),
            'url' => Url::to($path)
        ];
    }

}
